<%@ page pageEncoding="UTF-8"%>
<%@ page
	import="java.sql.*,com.icss.daos.*,java.util.*,com.icss.beans.BoardVO"%>
<jsp:directive.page import="com.icss.beans.BoardVO;" />

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Java|Java世界|</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css"
	href="<%=basePath%>BBS/images/style.css" title="Integrated Styles">
<script language="JavaScript" type="text/javascript"
	src="images/global.js"></script>



<!-- fckeditor -->
<script type="text/javascript" src="fckeditor/fckeditor.js"></script>
<script type="text/javascript">

window.onload = function()
{
	// Automatically calculates the editor base path based on the _samples directory.
	// This is usefull only for these samples. A real application should use something like this:
	// oFCKeditor.BasePath = '/fckeditor/' ;	// '/fckeditor/' is the default value.
	// var sBasePath = document.location.pathname.substring(0,document.location.pathname.lastIndexOf('_samples')) ;
	var sBasePath = "<%=request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
					+ request.getContextPath() + "/BBS/fckeditor/"%>"
//alert(sBasePath);
	var oFCKeditor = new FCKeditor( "cont" ) ;
	oFCKeditor.BasePath	= sBasePath ;
	oFCKeditor.ReplaceTextarea() ;
}

</script>
<!-- end of fckeditor -->


</head>
<body>
<%
			Object bid = session.getAttribute("bid");
			if (bid == null) {
				request.getRequestDispatcher("/BBS/index.jsp").forward(request, response);
			} else {
		%>


<br>
<div id="jive-flatpage">



<p class="jive-breadcrumbs"><a>首页</a> &#187; <a>|中软长沙ETC_中文论坛</a>
&#187; <a>Java世界 </a> &#187; <a>Java语言*初级版</a></p>
<p class="jive-page-title">主题: 发表新贴</p>
<a id="jive-reply-thread" href="<%= basePath%>BBS/reply.jsp">回复本主题</a> <br>


<jsp:useBean id="dao" class="com.icss.daos.BoardDao"></jsp:useBean>
<form action="<%=basePath%>bbsDealServlet?param=addArticle"
	method="post">

<table border="1" cellpadding="1" cellspacing="1">
	<tr>
		<td>标题：</td>
		<td width="250"><input type="text" name="articleName"></td>
	</tr>
	<br>
	<tr>
		<td>内容：</td>
		<td><textarea name="cont" rows="100" cols="250"></textarea></td>
		<br>
	</tr>
	<tr>
		<td>所属版块:</td>
		<td><select name="boardId">
			<%
															ArrayList<BoardVO> boarddaos = dao.getAllBoard();

															for (BoardVO type : boarddaos) {
													%>

			<option value="<%=type.getBoardID()%>"><%=type.getBoardName()%>
			</option>
			<%
													}
													%>
		</td>
	</tr>
</table>
<br>
<br>
<input type="submit" value="提交" /> &nbsp;&nbsp; <input type="reset"
	value="重置" /></form>

<div class="jive-message-list-footer"><a
	href="<%=basePath%>BBS/mainBBS.jsp">返回到主题列表</a></div>
<%
		}
		%>

</body>
</html>



